import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;


public class Fala extends Thread {

	private Socket conexao;
	public Fala(Socket conexao) {
		this.conexao = conexao;
	}

	public void run(){
		PrintStream saida;
		try {
			saida = new PrintStream(conexao.getOutputStream()); 
			BufferedReader teclado = new BufferedReader(new InputStreamReader(System.in));
			System.out.print("Digite seu nome: ");  
			String meuNome = teclado.readLine();
			saida.println(meuNome.toUpperCase()); 
			String msg;  
			while (true) {   
				System.out.print("> ");  
				msg = teclado.readLine();    
				saida.println(msg);  
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}      


	}
}
